Distance measuring device

ABSTRACT

This invention is an inexpensive distance measuring device having short lag time, configured so as to have a pair of light receiving regions at positions of focal points of a pair of image forming optical systems, comprising functions for dividing the light receiving regions and for monitoring the integration control for each divided light receiving region, also comprising an AF area sensor capable of performing pre-integration operations while causing strobe light to be emitted, and a microcomputer that, according to object field luminance distributions obtained from pre-integration results of the AF area sensor and to the focal length value of the photographic lens, divides the light receiving regions of the AF area sensor into respective pluralities, causes final integration operations to be performed while monitoring the integration control in each of the divided light receiving regions, and performs ranging computations based on data obtained for each light receiving region, capable of performing appropriate integration control over the entirety of a wide-range ranging region.

[0001] This application claims benefit of Japanese Application No.2000-032153 filed in Japan on Feb. 9, 2000, the contents of which areincorporated by this reference.

BACKGROUND OF THE INVENTION

[0002] 1. Field of the Invention

[0003] This invention relates to a distance measuring device, and moreparticularly to a distance measuring device having area sensing meansdeployed at the focal point position(s) of a pair of image formationoptical systems.

[0004] 2. Description of the Related Art

[0005] More and more cameras are being provided with autofocus functionsin recent years, being configured so that the distance to the object isdetected by a distance measuring device, and the photographic lens ismoved to a focus position based on the results of that detection.

[0006] When measuring the distance to an object by such a distancemeasuring device, in addition to distance measuring devices wherewithranging is made only in a limited region in the center of the screen,distance measuring devices have come to be known in recent years whichhave a wider field of view.

[0007] In Japanese Patent Application Laid-Open No. H10-104502/1998(published), for example, a type of such a distance measuring devicehaving a wide-range field of view is described which divides the imagepick-up region of a two-dimensional area sensor into a plurality ofareas, and performs integration control based on a maximum accumulationquantity pixel signal for each divided area.

[0008] And in Japanese Patent Application Laid-Open No. H10-126679/1988(published) is described a distance measuring device that deploys amonitor sensor so as to enclose the periphery of a two-dimensional areasensor, and performs integration control on the area sensor overallbased on outputs from that monitor sensor.

[0009] The distance measuring device described in Japanese PatentApplication Laid-Open No. H10-104502/1988 (published), however, isobject to the following problems.

[0010] That is, means are employed for referencing a maximum valueinside the area of each divided area, sequentially, divided area bydivided area, stopping the integration when an appropriate integralquantity has been arrived at in each divided area. Wherefore, when theobject is a high-brightness object, saturation can occur before theintegration control can be effected.

[0011] In order to cope with this problem, a high-speed control circuitor area sensor circuit may be employed. In that case, however, costs areincreased, wherefore such application ceases to be suitable for a smallsize instrument such as a compact camera, for example.

[0012] Furthermore, because the method of dividing the area is fixed, incases where one object covers a plurality of division areas, a problemarises in that the integration quantity differs from one portion of thatsame object to another, whereupon image data are produced which are notsuitable to the detection of the primary object.

[0013] With the art described in Japanese Patent Application Laid-OpenNo. H10-126679/1988 (published), on the other hand, the positions of thetwo-dimensional area sensor and monitor sensor differ, wherefore, whenthe two-dimensional area sensor and monitor sensor sense differentobject images, even if appropriate control is effected according to theoutput of the monitor sensor, problems arise, such as the area sensorintegral quantity being too great so that saturation is reached, or,conversely, such as the integration being insufficient, so thatappropriate object image data cannot be obtained.

[0014] Also, in cases where the accumulation quantity reaches saturationor is insufficient, integration will be performed repeatedly, whereforethe time lag will increase, which is also a problem.

SUMMARY OF THE INVENTION

[0015] An object of the present invention is to provide an inexpensivedistance measuring device with which appropriate integration control canbe effected across the entirety of a wide-range ranging region, andwherewith the time lag is short.

[0016] The present invention, substantially, is a distance measuringdevice comprising: two optical systems exhibiting parallax; an imagepick-up element for photographically capturing two images formed by theabovementioned optical systems; region setting means for setting dividedregions based on output from the abovementioned image pick-up element;integration control means for controlling integration operations of theabovementioned image pick-up element according to divided regionsproduced by the abovementioned region division means; and distancemeasurement means for performing distance measurements based on outputfrom the abovementioned image pick-up element.

[0017] The present invention, moreover, is a distance measuring devicecomprising: an area sensor deployed in the vicinity of position of focalpoints of a pair of image forming optical systems, and having a pair oflight receiving regions; a region dividing unit for dividing each oflight receiving regions of the abovementioned area sensor means into aplurality of regions according to area sensor data obtained from resultsof preliminary integrations of the abovementioned area sensor means; anda control circuit for causing the abovementioned area sensor to performfinal integration operations for each of the abovementioned setplurality of light receiving regions, and for computing signals forputting a photographic lens into a focused condition based on dataobtained for each of the abovementioned plurality of light receivingregions.

[0018] The present invention, furthermore, is a distance measuringdevice comprising: an area sensor deployed in the vicinity of focalpoints of a pair of image forming optical systems, and having a pair oflight receiving regions; main photographic object detection means fordetecting region where main photographic object is present; regiondivision means for setting light receiving regions of the abovementionedarea sensor based on output of the abovementioned main photographicobject detection means; and control means for causing the abovementionedarea sensor means to perform final integration operations for each ofthe abovementioned set light receiving regions, and performing distancemeasurement computations based on data obtained for each of those lightreceiving regions.

[0019] Still further, the present invention is a control method for acamera that puts a photographic lens into a focused condition for a mainphotographic object in an image pick-up screen, comprising the steps of:detecting image signals in the abovementioned image pick-up screen;detecting the abovementioned main photographic object based on theabovementioned image signals; setting a virtual area inside theabovementioned image pick-up screen so as to contain the abovementioneddetected main photographic object; again detecting image signals in theabovementioned virtual area; computing signals for putting theabovementioned photographic lens into a focused condition based on theabovementioned re-detected image signals; and putting the abovementionedphotographic lens in a focused condition based on results of theabovementioned computation.

[0020] These object(s) and advantages of the present invention willbecome further apparent from the following detailed explanation.

BRIEF DESCRIPTION OF THE DRAWINGS

[0021]FIG. 1 is a block diagram representing the configuration of acamera in a first embodiment aspect of the present invention;

[0022]FIG. 2 is a flowchart of the main routines performed by amicrocomputer in the first embodiment aspect;

[0023]FIGS. 3A and 3B are a perspective view and plan view showing thedeployment of a ranging optical system and AF area sensor in the firstembodiment aspect;

[0024]FIG. 4 is a diagram representing the pixel regions and initialdivision area of the AF area sensor in the first embodiment aspect;

[0025]FIG. 5 is a block diagram representing the internal configurationof the AF area sensor in the first embodiment aspect;

[0026]FIG. 6 is a diagram representing the relationships between aranging region and a standard, wide-angle, and telephoto image pick-upscreen in the first embodiment aspect;

[0027]FIG. 7 is a flowchart of AF routines in the first embodimentaspect;

[0028]FIGS. 8A, 8B, 8C, and 8D are timing charts representing thebehavior of signals during AF operations in the first embodiment aspect;

[0029]FIG. 9 is a flowchart representing details of a primary objectdetection operation in the first embodiment aspect;

[0030]FIG. 10 is a diagram representing the relationship between sensordata and pixel coordinates in an image pick-up region of the AF areasensor in the first embodiment aspect;

[0031]FIGS. 11A and 11B are line images representing image processingusing a first differential operator and a second differential operatorin the first embodiment aspect;

[0032]FIGS. 12A, 12B, 12C, and 12D are diagrams representing examples ofspace filter tables in the first embodiment aspect;

[0033]FIG. 13 is a flowchart of binarization processing in the firstembodiment aspect;

[0034]FIGS. 14A and 14B are graphs showing how threshold values are setbased on a histogram, in the first embodiment aspect;

[0035]FIG. 15 is a flowchart of threshold value setting processing inthe first embodiment aspect;

[0036]FIG. 16 is a flowchart for shape determination processing in thefirst embodiment aspect;

[0037]FIGS. 17A, 17B, 17C, and 17D are dia grams representing theappearance of image data processed when a person is determined by shapedetermination processing, in the first embodiment aspect;

[0038]FIG. 18 is a flowchart of AF routines in a second embodimentaspect of the present invention;

[0039]FIGS. 19A, 19B, and 19C are diagrams showing how primary objectselection is made causing light to be pre-emitted in a photographicscene, in the second embodiment aspect;

[0040]FIG. 20 is a flowchart of primary object detection processing inthe second embodiment aspect;

[0041]FIGS. 21A, 21B, 21C, 21D, and 21E are timing charts representingthe behavior of signals when preliminary integration and finalintegration are performed, in the second embodiment aspect;

[0042]FIGS. 22A and 22B are diagrams representing divided areas atwide-angle and at telephoto settings, in a third embodiment aspect ofthe present invention;

[0043]FIG. 23 is a diagram of one part of an AF area sensor in the thirdembodiment aspect, representing a configuration wherein division areasare switched for each optoelectric transfer element array;

[0044]FIG. 24 is a diagram of one part of the AF area sensor in thethird embodiment aspect, representing a configuration wherein divisionareas are switched for each pixel;

[0045]FIG. 25 is a block diagram of the internal configuration of an AFarea sensor in a fourth embodiment aspect of the present invention;

[0046]FIG. 26 is a flowchart of AF routines in the fourth embodimentaspect;

[0047]FIGS. 27A, 27B, 27C, 27D, 27E, and 27F are timing chartsrepresenting the behavior of signals when preliminary integration andfinal integration are performed, in the fourth embodiment aspect; and

[0048]FIG. 28 is a diagram representing divided areas corresponding tocandidates for the primary object set for a photographic scene in thefourth embodiment aspect.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0049] Embodiment aspects of the present invention are described below,with reference to the drawings.

[0050]FIG. 1 to FIG. 17D represent a first embodiment aspect of thepresent invention. FIG. 1 is a block diagram representing theconfiguration of a camera.

[0051] This camera comprises control means, ranging means, and amicrocomputer 11 that is a system controller which also functions aspreliminary detection means. The microcomputer 11 is configured so thatit has a CPU (central processing unit) 11 a that performs a series ofoperations according to a sequence program, a ROM 11 b for storing thesequence program, a RAM 11 c that provides working memory for the CPU 11a, an A/D converter 11 d, and an EEPROM 11 e for storing compensationdata for each camera relating to AF, photometry, and exposurecomputations, etc., and for storing various kinds of parameters and thelike for detecting a primary object in an image pick-up screen to bedescribed subsequently.

[0052] An AF area sensor 12 that is an image pick-up elementconstituting area sensor means picks up an object image formed by aranging optical system (cf. FIGS. 3A and 3B), described subsequently,and converts that image to electrical signals. This AF area sensor 12 isconfigured such that it has an image pick-up region (light receivingregion) 12 a formed by light receiving elements consisting ofphotodiodes or the like arrayed two-dimensionally in the horizontaldimension and vertical dimension, a processing circuit 12 b that is acircuit for processing the electrical signals output from the imagepick-up region 12 a and that constitutes region division means forperforming processing to divide a light receiving region such as isdescribed subsequently into a plurality, and an ordinary lightelimination unit 12 c constituting ordinary light elimination means fordetecting image pick-up signals corresponding only to light reflectedfrom the object, when performing image pick-up while projectingauxiliary light, by that projected light component, from those imagepick-up signals.

[0053] Provision is made so that the output from this AF area sensor 12,after being converted to digital signals by the A/D converter 11 d inthe microcomputer 11, is processed inside that microcomputer 11.

[0054] The operations of such an AF area sensor 12 are as follows.

[0055] When light is input to the light receiving elements in the imagepick-up region 12 a described above, electrical charges are generated byoptoelectric transfer. These charges are converted to voltages by pixelcircuits for each pixel, and output after being amplified.

[0056] The microcomputer 11 described earlier controls the integrationoperations of the AF area sensor 12 and the sensor data read-outoperations thereof, and also objects the sensor data output from that AFarea sensor 12 to processing in performing ranging computations.

[0057] When photographing is performed while projecting auxiliary light,provision is made so that switching can be done so as to eliminate ornot eliminate ordinary light by the microcomputer 11. When the ordinarylight is to be eliminated, image pick-up signals corresponding only tolight reflected from the object resulting from the projected lightcomponent are detected.

[0058] A focus lens drive unit 13 drives a focus lens 14 contained inthe photographic lens so as to focus it, and is configured so as tocomprise a focusing motor and control circuit therefor, etc.

[0059] Provision is made so that the position of the focus lens 14 isdetected by a focus lens encoder 15 constituting focal length detectionmeans, and output as a pulse signal corresponding to the amount ofmovement in the focus lens 14.

[0060] That is, the microcomputer 11 is configured so that it outputsdrive signals to the focus lens drive unit 13 based on the results ofranging computations, monitors the output of the focus lens encoder 15,and controls the position of the focus lens 14 by the focus lens driveunit 13.

[0061] A photometric unit 25 is configured so that it measures the lightafter dividing a range corresponding to the image pick-up screen into aplurality, processes photoelectric current signals generated from thedivided regions of a light receiving element for photometry 25 a, andgenerates photometric outputs.

[0062] The photometric output from that photometric unit 25 is alsoinput to the microcomputer 11, A/D converted by the A/D converter lid,and then used in the photometry and exposure computations in themicrocomputer 11.

[0063] A shutter drive unit 16 controls the drive of a shutter (notshown) based on commands output from the microcomputer 11, and controlsthe time intervals with which the object light flux transmitted throughthe photographic lens reaches the film.

[0064] A strobe circuit unit 20 controls the light emissions of a strobe20 a that functions as auxiliary light projection means used duringphotographing, and is configured so that, by commands from themicrocomputer 11, the electrical charging of and light emissionstherefrom are controlled by the strobe circuit unit 20. This strobecircuit unit 20 is also used for AF auxiliary light during rangingoperations.

[0065] A display unit 19 displays various kinds of information relatingto this camera by LCDs or other display elements, under the control ofthe microcomputer 11.

[0066] A zoom lens drive unit 22 is configured so that, according tocommands from the microcomputer 11, it drives a zoom lens 23 of thephotographic lens and makes changes in the focal length. Provision ismade so that that focal length information corresponding to the positionof the zoom lens 23, the focal length of which has been changed in thismanner, is output to the microcomputer 11.

[0067] A camera attitude detection unit 24 detects the camera attitude(that is, whether it is positioned vertically or horizontally, forexample), and outputs that information to the microcomputer 11.

[0068] A film drive unit 21, based on commands from the microcomputer11, performs film drive operations such as auto-loading operations whenloading film, single-frame winding advance operations after an exposure,and rewind operations after the completion of a series ofphotographings.

[0069] A first release switch 17 and a second release switch 18constitute a two-stage switch that is linked to depression actions witha release button, configured so that the first release switch 17 turnson when the release button is depressed to a first stage and so that thesecond release switch 18 turns on when the release button is depressedfurther to a second stage.

[0070] The microcomputer 11 is configured so that, upon detecting thatthe first release switch 17 has turned on, it performs an AF operationor ranging operation, and upon detecting that the second release switch18 has turned on, it causes an exposure operation to be performed by theshutter drive unit 16, and also so that it causes the film drive unit 21to perform a film winding advance operation after that exposureoperation has been completed.

[0071] Next, FIG. 2 is a flowchart that represents the main routineexecuted by the microcomputer 11.

[0072] When a battery is mounted in the camera, or when an electricpower switch (not shown) is turned on after the battery has beenmounted, the microcomputer 11 begins operating and executes a sequenceprogram stored in the ROM 11 b.

[0073] When these operations are started, first, each block inside thecamera is initialized, and compensation data and adjustment data for AFand photometry and the like stored in the EEPROM 11 e are read into theRAM 11 c (step S1).

[0074] Then the condition of the first release switch 17 is detected(step S2).

[0075] Here, if the first release switch 17 is on, then ranging isperformed based on sensor data from the AF area sensor 12 and, based onthe results of that ranging, an AF operation is performed that drivesthe focus lens 14 by the focus lens drive unit 13 while referencing theoutput from the focus lens encoder 15 (step S3).

[0076] After that, ranging and exposure computations are made based onthe output from the ranging unit 25 (step s4).

[0077] Then the microcomputer 11 waits until the second release switch18 turns on (step S5). When the second release switch 18 is still in theoff state here, step S2 is returned to and the operations describedabove are repeated.

[0078] When the second release switch 18 is turned on, on the otherhand, a shutter operation is performed by the shutter drive unit 16 andan exposure is made on the film (step S6).

[0079] When the exposure operation is completed, the film is wound aheadone frame by the film drive unit 21 (step S7), and step S2 is returnedto in preparation for the next photograph to be taken.

[0080] In step S2, described above, when the first release switch 17 isstill off, inputs from switches other than the first release switch 17and second release switch 18 are detected (step S8). If no such inputsare detected, the step S2 is returned to, and the status of the firstrelease switch 17 is detected. If, on the other hand, such an input isdetected, processing is performed according to that switch input. If theswitch is the zoom-in switch, for example, then the zoom lens 23 isobjected to a zoom up or zoom down action by the zoom lens drive unit 22according to whether that zoom switch input is up or down (step S9).Then step S2 is returned to and the microcomputer 11 waits for the firstrelease switch 17 to turn on.

[0081]FIG. 3A and FIG. 3B are a perspective view and plan viewrepresenting the deployment of a ranging optical system and an AF areasensor.

[0082] The ranging system in this camera is configured so that thedistance to an object is measured with an outside light passive scheme.

[0083] This ranging optical system is configured so that it has lightreceiving lenses 26 a and 26 b that constitute a pair of image formationoptical systems, as diagrammed in FIG. 3A. These light receiving lenses26 a and 26 b are deployed separated by a baseline length B, asdiagrammed in FIG. 3B.

[0084] The image of an object 27 is divided into two images by the lightreceiving lenses 26 a and 26 b, and images are formed, respectively, inthe image pick-up region 12 a of the AF area sensor 12.

[0085] If the relative positional difference on the AF area sensor 12between the two images divided in that manner is taken as x, then,according to the triangulation distance principle (cf. FIG. 3B), thedistance to the object L can be calculated by formula 1 given below fromthe focal length f of the light receiving lenses and the baseline lengthB.

[0086] Formula 1

L=(B·f)/x

[0087] Provision is made so that a ranging computation using such aformula as 1 above is performed by the microcomputer 11. Morespecifically, the microcomputer 11 sets a ranging block in the imagepick-up region 12 a in the AF area sensor 12, performs a correlationcomputation using sensor data corresponding to the two images, anddetects the relative positional difference x between the two images.Then the distance to the object L is calculated based on formula 1above.

[0088] Next, FIG. 4 is a diagram representing pixel regions and aninitial divided area in the AF area sensor 12.

[0089] As described in the foregoing, provision is made so that, whenperforming a ranging computation, the image pick-up region 12 a that isthe light receiving region of the AF area sensor 12 is divided incorrespondence with the light receiving lenses 26 a and 26 b,respectively, and the regions divided at that time are the pixel regions29 a and 29 b indicated in FIG. 4. These pixel regions 29 a and 29 b areconfigured further so that they have a plurality of initial dividedareas, as diagrammed, respectively.

[0090] Moving on, FIG. 5 is a block diagram representing the internalconfiguration of the AF area sensor 12.

[0091] A control circuit 31 is a block for controlling the overalloperations of the AF area sensor 12 based on commands from themicrocomputer 11, configured so as to have an integration control unit32 constituting integration control means, a read-out area selectionunit 33 constituting region setting means, and a monitor area selectionunit 34.

[0092] The pixel regions 29 a and 29 b are divided into a plurality ofdivided areas 1, 2, 3, . . ., n, which divided areas, respectively, havemonitor circuits 1, 2, 3, . . . , n. These monitor circuits are forgenerating analog voltages for monitoring information on the quantity of19 pixels accumulated inside the divided areas. The monitor outputsthereof are outputs which for example indicate peaks (maximum values) inthe accumulation quantities of pixels in the divided areas.

[0093] The integration control unit 32 outputs integration start signalsand integration stop signals to the divided areas on command from themicrocomputer 11.

[0094] The read-out area selection unit 33 selects divided areas forsensor data read-out on command from the microcomputer 11.

[0095] And the monitor area selection unit 34 selects the divided areamonitor circuits on command from the microcomputer 11.

[0096] The sensor data outputs from the divided areas are selected withon-off switches SW1S, SW2S, SW3S, . . . , SWnS by the read-out areaselection unit 33, and input via a buffer Bs from a terminal SDATA to anA/D converter lid (AD2) in the microcomputer 11.

[0097] Monitor data from the divided areas, furthermore, are selectedwith on-off switches SW1M, SW2M, SW3M, . . . , SWnM by the monitor areaselection unit 34, and next input to a peak detection circuit 35.

[0098] That peak detection circuit 35 is a circuit that detects the peakvalue where the accumulation quantity is maximum in the monitor dataselectively input, and outputs the voltage level thereof. When alldivided area monitor data are input, for example (that is, when all ofthe switches SW1M, SW2M, SW3M, . . . , SWnM are on), the peak monitorlevel in all of the divided areas is output.

[0099] When the monitor data input are one data unit, the peak detectioncircuit 35 functions as a simple buffer and outputs a signal identicalto the input monitor data.

[0100] The output from the peak detection circuit 35 is input via abuffer Bm from the terminal MDAT to the A/D converter lid (AD1) in themicrocomputer 11.

[0101]FIG. 6 is a diagram that represents the relationship between theranging region and the standard, wide-angle, or telephoto image pick-upscreen.

[0102] The ranging system adopted for this camera employs the externallight ranging scheme described above, wherefore parallax exists betweenthe image pick-up screen and the ranging region. For that reason, theconfiguration is such that the regions used for ranging are limitedaccording to the photographic optical system focal length information(zoom information).

[0103] The ranging area position compensation data responsive to suchfocal length changes are stored beforehand in the EEPROM 11 e, and aredeployed in the RAM 11 c as described in the foregoing when initializingthe microcomputer 11.

[0104] The microcomputer 11 references that compensation data accordingto the zoom position of the zoom lens on which a zooming operation hasbeen effected by the operation of the zoom switch, and determines thedivided areas to be used in ranging operations in the image pick-upregion 12 a of the AF area sensor 12.

[0105] The microcomputer 11 then instructs the read-out area selectionunit 33 in the AF area sensor 12, effecting control so that only thesensor data in the determined divided area range are output, andperforms a ranging computation using the sensor data in that dividedarea range.

[0106] The microcomputer 11 also outputs control signals to the monitorarea selection unit 34 in the AF area sensor 12 so that a monitor signalcorresponding to the interior of that divided area is generated.

[0107] In response thereto, the AF area sensor 12 outputs the monitorsignal within the range of the designated divided area to themicrocomputer 11. The microcomputer 11 references that monitor signaland effects control so that the integration quantity attains aprescribed level.

[0108] In this manner, provision is made so that, when the camerashooting range is changed by a zoom operation, a ranging operation canbe performed without being influenced by a subject that is off the imagepick-up screen.

[0109] Moving on, FIG. 7 is a flowchart of an AF routine, while FIGS.8A, 8B, 8C, and 8D are timing charts representing the behavior ofsignals during AF operations. The description below follows FIG. 7,making reference to FIGS. 8A, 8B, 8C, and 8D.

[0110] In the main routine diagrammed in FIG. 2, when the AF routine iscalled in step S3, that AF operation is started.

[0111] Then, first of all, a preliminary integration is performed (stepS11). In that preliminary integration, the divided areas of the AF areasensor 12 are set in the entirety of the pixel regions corresponding tothe image pick-up screen. That is, all of the switches SW1M, SW2M, SW3M,. . . , SWnM are turned on by the monitor area selection unit 34, andintegration control is effected based on the monitor peak values for theentirety of the pixel regions corresponding to the image pick-up screen.

[0112] In other words, an integration start signal such as diagrammed inFIG. 8A is output from the integration control unit 32, and integrationoperations are started for all of the divided areas in the AF areasensor 12. Also, monitor data as diagrammed in FIG. 8B input from theterminal MDATA are monitored, and, when an appropriate monitor level isreached, integration is stopped by the integration control unit 32.

[0113] Next, sensor data read-out is performed (step S12). As diagrammedin FIG. 8C, while outputting a read-out signal CLK to the AF area sensor12, divided areas are selected, and, as diagrammed in FIG. 8D, sensordata are sequentially output to the A/D converter lid. These sensor dataare converted to digital signals and read out by that A/D converter lidand stored in the RAM 11 c.

[0114] Next, primary subject detection is performed for the sensor dataobtained as a result of the preliminary integration operation describedearlier (step S13), and the divided areas are determined on the basis ofthe results of that primary object position detection (step S14).

[0115] After that, final integration is performed for each of thosedivided areas (step S15). In these final integrations, monitor signalsare output from the monitor circuits of the divided areas in the AF areasensor 12 (cf. FIG. 8B). While sequentially referencing these monitorsignals for each divided area, or effecting control to find anappropriate integration time interval based on the sensor data and theintegration time interval during the preliminary integration operation,integration control is performed so that the accumulation quantitybecomes appropriate.

[0116] Next, sensor data read-out is performed (step S16). Here, whileoutputting a read-out clock signal (cf. FIG. 8C) to the AF area sensor12, a command is output to the read-out area selection unit 33 anddivided areas are selected, and the sensor data are output sequentiallyto the A/D converter lid (cf. FIG. 8D). These sensor data are A/Dconverted and read out, and stored in the RAM 11 c.

[0117] Next, based on the sensor data obtained, a ranging computation isperformed for each divided area (step S17), the focus lens 14 notedearlier is driven, based on the ranging data obtained (step S18), andthe main routine is then returned to.

[0118] Moving on, FIG. 9 is a flowchart representing the details of theprimary object detection operation.

[0119] In the AF processing diagrammed in FIG. 7, in step S13, when aprimary object detection processing routine is called, the operationdiagrammed in FIG. 9 is started.

[0120] In this primary object detection routine, the particular case isassumed where the primary object is a person, and the case where thatperson is detected is described.

[0121] Two images are obtained by output from the pixel regions 29 a and29 b of the AF area sensor 12 described in the foregoing, but the imagedata (sensor data) used for detecting the primary object may be for oneor other of those images, or, alternatively, both images may be used.The sensor data read out from the AF area sensor 12 are stored in theRAM 11 c inside the microcomputer 11, and the processing described belowis performed based on those sensor data.

[0122] First, smoothing processing is performed (step S21). Thissmoothing processing is processing for removing random noise in theimage or images, by performing filtering processing or Fouriertransforms, for example. Such random noise is generated because ofrandom noise present in the AF area sensor 12 itself or because ofoutside noise produced when the voltage changes in the power supply forthe AF area sensor 12.

[0123] Next, the sensor data are subjected to differential processing(step S22). As a result, the edge candidate regions in processing todetect edges and the intensities thereof are given.

[0124] Then binarization processing is performed, and, by extracting theportion or portions below a certain threshold value for the image, abinary image is found (step S23).

[0125] Next, linking and figure merging processing is performed (stepS24), whereupon figures are obtained having a certain widthcorresponding to the edge(s), wherefore line narrowing processing isperformed, employing a line-thinning algorithm, making the line width(s)approximately 1 (step S25).

[0126] After that, a process for distinguishing the shape of the imageis performed, the primary object is extracted (step S26), and the AFprocess routine is returned to.

[0127] The process routines performed in the primary object detectiondiagrammed in FIG. 9 are now described in even greater detail.

[0128] The smoothing processing in step S21, which is a process forremoving random noise that becomes mixed into an image, as described inthe foregoing, may be described in greater detail as follows.

[0129] There are various stages in this smoothing processing, but amedian filter stage for finding the middle value (median) of pixelvalues in a nearby region, for example, and an edge preserving filterstage wherein a nearby region is divided into small regions, adispersion is found for each of those small regions, the small regionsare found where that dispersion becomes a minimum is found, and theaverage value thereof is output, are effective.

[0130] The median filter described above is object to side effects suchas that the edges of an image are softened, and the edge preservingfilter, on the other hand, wherewith edges are not softened, istherefore thought to be more effective.

[0131] Besides the median filter and edge preserving filter, moreover,there are also means based on Fourier transforms.

[0132] Next, the edge detection processing based on differentialprocessing in step S22 is performed as described in greater detail asfollows. FIG. 10 is a diagram representing the relationship betweensensor data and pixel coordinates in the image pick-up region of the AFarea sensor.

[0133] As diagrammed in FIG. 10, taking the sensor data at the pixelcoordinates (i, j) in the image pick-up region 12 a as s(i, j), forthose sensor data s(i, j), edge detection is performed by performingprocessing such as that described below.

[0134] With a method based on first differential operators, Δxs(i, j)representing the differential in the x dimension of the sensor data s(i,j) and Δys(i, j) representing the differential in the y dimensionthereof, respectively, are computed by the formulas given in 2 below.

[0135] Formula 2

Δxs(i,j)=s(i,j)−s(i−1,j)

Δys(i,j)=s(i,j)−s(i,j−1)

[0136] As a result of performing such computations as these, fororiginal image data such as diagrammed at the upper level in FIG. 11A,for example, the post-processing image data such as diagrammed in thelower level thereof are obtained. FIGS. 11A and 11B are graphsrepresenting image processing based on first differential operators andsecond differential operators.

[0137] With a method based on second differential operators, Δ²xs(i, j)representing the second differential in the x dimension of the sensordata s(i, j) and Δ²ys(i, j) representing the second differential in they dimension thereof, respectively, are computed by the formulas given in3 below.

[0138] Formula 3

Δ² xs(i,j)=s(i−1,j)−2s(i,j)+s(i+1,j)

Δ² ys(i,j)=s(i,j−1)−2s(i,j)+s(i,j+1)

[0139] With a Laplacian operator that is one type of second differentialoperator, in order to emphasize the portion at the shoulder of the edge,for original image data as diagrammed in the upper level of FIG. 11Bthat are original image data like that diagrammed at the upper level inFIG. 11A, image data are obtained after processing wherein a transitionis made from a positive region to a negative region, as diagrammed inthe lower level in FIG. 11B. By finding the portion where 0 is attainedin the image data after such processing, the edge position can becalculated.

[0140] As a method for specifically processing formulas like those givenabove, provision is made for processing by performing sum of productscomputations for the sensor data s(i, j) and space filter tables (weighttables) such as are given in FIGS. 12A, 12B, 12C, and 12D. FIGS. 12A,12B, 12C, and 12D are diagrams representing examples of space filtertables.

[0141]FIG. 12A is an example of a filter table in a first differentialoperator in the horizontal dimension, while FIG. 12B is an example of afilter table in a first differential operator in the vertical dimension.

[0142]FIG. 12C, moreover, represents an example of a filter table in aLaplacian operator that is a second differential operator.

[0143]FIG. 12D, furthermore, represents an example of a filter table ina tsobel operator. The vertical lines on the two flanks of the tableindicate that absolute values are taken, sum of products computationsare performed between the sensor data s(i, j) and the table representinga first differential in the x dimension, other sum of productscomputations are performed between the sensor data s(i, j) and the tablerepresenting a first differential in the y dimension, then therespective absolute values are taken, and, finally, processing is doneto add those.

[0144] If the space filters diagrammed in FIGS. 12A, 12B, 12C, and 12D,as noted above, are represented as W(i, j), the sensor data S′(x, y)after processing can be calculated using formula 4 given below from thesensor data S(x, y) before processing.

[0145] Formula 4 $\begin{matrix}{{S^{\prime}( {x,y} )} = {\frac{1}{n}{\sum\limits_{{i = {- 1}},{j = {- 1}}}^{1,1}{{S( {{x + i},{y + i}} )} \cdot {W( {i,j} )}}}}} & \text{Formula~~4}\end{matrix}$

[0146] where S(x, y) indicates sensor data before processing, S′(x, y)sensor data after processing, W(i, j) a space filter, and n a constant.

[0147] The space filter W(i, j) in such a formula as 4 above is selectedaccording to the situation from various types such as are diagrammed inFIGS. 12A, 12B, 12C, and 12D. Specific examples of making this selectionaccording to the situation are given below.

[0148] When the image data for all pixels are to be objected todifferential processing, it is well to use first differential operatorswherewith computations are comparatively simple and fast, or Laplacianoperators.

[0149] When only some images in the image pick-up screen are to besubjected to differential processing, it is well to select and usetsobel operators wherewith great effectiveness is obtained although thecomputations are somewhat complex and the computation time great.

[0150] In cases where the AF area sensor 12 integration time becomeslong due to the brightness of the object being low, provision may bemade so that first differential operators or Laplacian operators areused, while, on the other hand, when integration time is short withobjects of high brightness, provision may be made so that the AF timelag is balanced by using tsobel operators.

[0151] Next, FIG. 13 is a flowchart of binary processing (thresholdvalue processing), while FIGS. 14A and 14B are graphs that show howthreshold values are set based on histograms.

[0152] In the primary object detection processing diagrammed in FIG. 9,when the binary processing routine is called in step S23, the operationsindicated in FIG. 13 are started.

[0153] First, a histogram is created that represents the frequency ofappearance of pixel values that indicate brightness levels in an image(step S31).

[0154] Next, a threshold value is set based on the histogram created(step S32). More specifically, when a mode method is used, for example,a brightness value Ba wherewith the frequency becomes minimum in thehistogram created is set as the threshold value (threshold level) (cf.FIG. 14A).

[0155] Binarization is then performed based on that threshold value(threshold level) (step S33), and the calling routine is returned to.

[0156] In step S32 described above, furthermore, the method ofdetermining the threshold value based on a histogram is not limited to amode method, and there are various other methods.

[0157] A number of such methods may be cited, including, for example,the p-tile method that is effective when the surface area of the figurepulled out is to some degree known, the differential histogram methodthat establishes the threshold value so that it occurs at a boundaryportion of the figure, the distinguishing analysis method that finds aparameter t so that, when the set of density values is divided into twoclasses, the separation between classes is optimized, and the variablethreshold method that causes the threshold value to vary according tothe image position.

[0158] In step S32, one or other of these methods is selected and usedso as to best accord with the situation.

[0159] For example, when the shape of the histogram is distinguished,and a determination is made as to whether or not a clear minimum valueexists, the mode method is adopted when such does clearly exist. Whensuch does not exist, on the other hand, or when it exists but is notclear, the distinguishing analysis method is adopted.

[0160] In this manner, the shape of the histogram is distinguished, anda threshold setting method is adopted according to the results thereof.For the method used in distinguishing the shape of the histogram at thistime, a value a that is an extreme value (valley) that is also afrequency minimum value (where the brightness value is Ba), and a valueb that is an extreme value (valley) where the frequency is the secondsmallest (where the brightness is Bb) are found, for example, asdiagrammed in FIG. 14B, and the difference therebetween b−a is comparedwith a prescribed determined value d_(th). When, as a result of thatcomparison, b−a is larger than the prescribed value d_(th), thebrightness value Ba for the minimum value a is adopted as the thresholdvalue, whereas, when it is equal to or less than the prescribed valued_(th), the variable threshold value method that varies the thresholdvalue according to the image position is adopted.

[0161]FIG. 15 is a flowchart for such threshold value settingprocessing.

[0162] In the binarization processing indicated in FIG. 13, when thethreshold value setting process routine is called in step S32, theoperations indicated in FIG. 15 are started.

[0163] First, the frequency minimum value a and the second smallestfrequency value b are found (step S41), and the prescribed determinedvalue d_(th) is compared against (b−a) to see which is greater (stepS42).

[0164] Thereupon, when (b−a) is larger than the determined value d_(th),the brightness value Ba corresponding to the minimum value a is adoptedas the threshold value (step S43), whereas, when (b−a) is equal to orless than the determined value d_(th), the variable threshold valuemethod is adopted (step S44) and the calling routine is returned to.

[0165] Furthermore, when binarization processing is performed for animage corresponding to the entire image pick-up screen, binarizationprocessing is performed after setting the threshold value first by themode method. Provision may also be made so that, when the binarizedimage is evaluated and found not to be good, the image will be dividedinto a plurality of blocks, a histogram created for each divided block,and a threshold value newly set for each divided block.

[0166] The various kinds of processing performed in the primary objectdetection processing indicated in FIG. 9 may now be summarized asfollows.

[0167] First, the labeling done in step S24 is a process of applyinglabels to linked portion masses where pixels having the same brightnessin the image are mutually linked. That is, different labels are appliedto different linked portions to distinguish them, and the regions(linked regions) are separated (cf. labelings 1 to 6 in FIG. 17B).

[0168] The figure merging process in step S24 is processing for removingnoise such as holes. That is, not only are point figures or figures ofsmall area such as holes contained in an image not essentiallyeffective, but they have the potential to adversely affect subsequentprocessing, wherefore they constitute noise that needs to be removed.That being so, this processing expands or reduces the original figureand removes such noise components.

[0169] The line thinning in step S25 is processing to which the obtainedbinary image is subjected, wherein the individual linked regionscontained therein are processed so that they are thinned to line figureshaving a line width of 1, without impairing the linkage. Morespecifically, processing is performed wherein, in a line-form figure ofany thickness, the center line in the line figure is found bysuccessively removing pixels in the width dimension thereof.

[0170] The image shape determination in step S26 is performed using thecoefficient e given in formula 5 below.

[0171] Formula 5

e=(peripheral length)²/(surface area)

[0172] The surface area in this formula is the number of pixelsbelonging to the linked regions in view, and the peripheral length isthe number of pixels positioned at the boundaries surrounding thoselinked regions. However, when calculating the peripheral length, theportions oriented in a diagonal direction are corrected by a factor of 2relative to the portions oriented in the horizontal or verticaldirections.

[0173] The coefficient e given in formula 5 above represents the minimumvalue when the figure is circular. This is a coefficient that takes on aprogressively larger value as the figure becomes more complex. The faceof a person can be considered to form a shape that is more or lesscircular, wherefore a determination as to whether or not the image atissue is the face of a person can be made by comparing the coefficient ewith a prescribed value.

[0174] Also, because the surface area of the face of a person is of amore or less determined size, when the distance to the object and thefocal length of the photographic lens are determined, the surface areaformed as an image inside the image pick-up region can be more or lessspecified. Thereupon, by comparing the surface area of the linkedregions noted earlier with a prescribed value, it becomes possible todetermine more precisely whether or not the image at issue is the faceof a person.

[0175] Provision may also be made so that, prior to performing figuredetermination, the surface area is compared to values in a prescribedrange, a judgment made that this is not the image of a person when thatprescribed range is exceeded, and the shape determination processingomitted. If such processing as this is performed, the computation volumecan be reduced and the AF time lag shortened.

[0176]FIG. 16 is a flowchart of shape determination processing.

[0177] In the primary object detection processing indicated in FIG. 9,when the shape determination processing routine is called in step S26,the operations indicated in FIG. 6 are started.

[0178] First, a judgment is made as to whether or not the extractedregion exists (step S51). When there is no extracted region, the callingroutine is returned to.

[0179] When, on the other hand, an extracted region does exist, thesurface area S of that extracted region is found and a judgment is madeas to whether or not that value is within a prescribed range (step S52).

[0180] When here the extracted region area S is within the prescribedrange, the figure determination value e is next calculated, and ajudgment made as to whether or not this is within a prescribed range(step S53).

[0181] When this figure determination value e is within the prescribedrange, it is judged that the image in the extracted region is the imageof a person (step S54).

[0182] When in step S52 the surface area S of the extracted region isnot within the prescribed range, or when in step S54 the figuredetermination value e is not within the prescribed range, it is judgedthat the image in the extracted region is an image other than that of aperson (step S57).

[0183] When these judgments have been made in step S54 or step S57, ajudgment is next made as to whether or not figure determinations havebeen made for all of the extracted regions (step S55), and, when suchhave not finished, the next extracted region is set (step S56) and theoperations in step S52 and following described in the foregoing arerepeated.

[0184] Thus, as soon as it has been judged in step S55 that figuredeterminations have been performed for all of the extracted regions,this processing is ended and the calling routine is returned to.

[0185] Next, FIGS. 17A, 17B, 17C, and 17D are diagrams representing theappearance of image data processed when performing person determinationsby the shape determination processing described in the foregoing.

[0186] First, FIG. 17A represents the appearance of the original imagein one example, which is the appearance of an image formed in the imagepick-up region 12 a of the AF area sensor 12 corresponding to the imagepick-up screen.

[0187] Next, FIG. 17B represents the appearance of the image afterperforming the differential processing and binarization processingdescribed earlier. At this time, the image is one wherein only the edgeportions indicating contours are extracted, with labeling processingeffected in each extracted area (cf. labelings 1 to 6 in the drawing).

[0188] Further, FIG. 17C is a diagram representing the setting of aperson determination region and divided area.

[0189] When it is judged that the region corresponding to the labeling 2in the diagram given in FIG. 17B is an image that contains the face of aperson, that person determination region 41 is extracted.

[0190] With all of the portions up to the portions noted above beingportions related to primary object detection, the portions for the nextdivided area setting are now described.

[0191] As diagrammed in FIG. 17C, a plurality of divided areas isintegrated and a divided area 42 set so as to contain the persondetermination region 41 that is the primary object, and finalintegration is performed on the basis of a monitor signal for thatdivided area 42.

[0192] That is, in the configuration diagrammed in FIG. 5, notedearlier, the output of the monitor circuit corresponding to the dividedarea 42 is selected by the monitor area selection unit 34 and input tothe peak detection circuit 35.

[0193] Thereupon, the integration control unit 32 begins the integrationoperation, and the integration is terminated so that an appropriateaccumulation quantity is effected with reference to the monitor signal(terminal MDATA output) that is the output of the peak detection circuit35.

[0194] Next, sensor data of the divided area corresponding to the persondetermination region 41 set by the read-out area selection unit 33 areread out.

[0195] Thus appropriate sensor data are obtained for the persondetermination region 41.

[0196] The divided area 42 here is set as a single area, but that posesno limitation, and a plurality of divided areas may be set.

[0197] Moving on, in FIG. 17D, the person determination region 41 and aranging area group 43 that is a plurality of ranging areas set insidethe person determination region 41 are represented.

[0198] Using the sensor data obtained as described in the foregoing, aplurality of ranging areas is set inside the person determination region41 as diagrammed here in FIG. 17D, and ranging computations areperformed for those ranging areas, respectively.

[0199] From the results of the plurality of ranging computations, oneset of ranging data can be obtained, either by making a closest-rangeselection, or by taking the average, etc.

[0200] As described in the foregoing, based on the results of theprimary object detection based on a preliminary integration, a dividedarea or areas are newly set, and integration control is performed basedon the divided area or areas set, wherefore appropriate image data canbe obtained wherein the primary object is focused.

[0201] According to this first embodiment aspect, appropriateintegration control can be performed across a broad range, wherefore itis possible to raise the detection precision. Also, because specialhigh-speed control circuits and area sensor circuits are unnecessary,costs are not increased.

[0202] FIGS. 18 to 21E represent a second embodiment aspect of thepresent invention. FIG. 18 is a flowchart of an AF routine; FIGS. 19A,19B, and 19C diagram how, in a photographic scene, light is pre-emittedand the primary object selected; FIG. 20 is a flowchart of primaryobject detection processing; and FIGS. 21A, 21B, 21C, 21D, and 21E aretiming charts representing the behavior of signals when performingpreliminary integration and final integration. In this second embodimentaspect, portions that are the same as in the first embodiment aspectdescribed in the foregoing are not further described; the descriptionfocuses primarily on the points of difference therebetween.

[0203] The AF routine indicated in FIG. 18 is a modification of the AFroutine given in FIG. 7 in the first embodiment aspect.

[0204] In the main routine given in FIG. 2, when the AF routine iscalled in step S3, that AF operation is started.

[0205] First, the image region corresponding to the overall imagepick-up screen is set as one divided area (step S61).

[0206] Here, instead of performing the preliminary integration in stepS11 in FIG. 7, preliminary integration is performed based on lightpre-emission and ordinary light elimination integration (step S62),sensor data are read out (step S63), and the primary object is detected(step S64).

[0207] The reason for this is that, when an AF routine as shown in FIG.7 is employed for a photographic scene as shown in FIG. 19A, detectionoperations are also effected to detect a primary object, other than theprimary object 45, in the background scenes 46 and 47 (cf. FIG. 19B),whereupon there is a possibility that excessive processing will begenerated and the time lag made larger.

[0208] In order to resolve this, in this preliminary integration,ordinary light removal integration is performed on the AF area sensor 12while causing the strobe 20 a to make a plurality of pre-emissions (cf.the portions for the preliminary integrations in FIGS. 21A, 21B, 21C,21D, and 21E). Because the quantity of light reflected from an object asa result of the pre-emissions is greater for the object present at ashorter distance, if integration control is effected at the reflectedlight quantity peak, the outputs for the objects at greater distancesfor which the quantity of reflected light is smaller will be eliminated.Thus only the divided area 1 can be selected, for example, as diagrammedin FIG. 19C.

[0209] The details of the primary object detection processing in stepS64 are now described, making reference to FIG. 20.

[0210] The sensor data correspond to the quantity of light reflectedfrom an object as a result of a pre-emission, wherefore the sensor dataare analyzed, and the divided areas for which the quantity of suchreflected light is smaller than a prescribed quantity, that is, wherethe object is positioned at a comparatively great distance, areeliminated (step S81). Thus the processing in steps S82 to S87 describedbelow is not performed for those eliminated divided areas.

[0211] The processing in steps S82 to S87 described below is the same asthe processing in steps S21 to S26 indicated earlier in FIG. 9.

[0212] That is, smoothing processing is performed (step S82), the sensordata are subjected to differential processing (step S83), binarizingprocessing is performed (step S84), labeling and figure mergingprocessing is performed (step S85), line narrowing processing isperformed (step S86), and shape determination processing is performed toextract the primary object (step S87), after which the AF routine isreturned to.

[0213] When that primary object detection processing is finished, the AFroutine in FIG. 18 is again returned to, and divided area setting isperformed (step S65).

[0214] Then, a determination is made as to whether or not the sensordata for the primary object position resulting from the preliminaryintegration is low contrast (step S66). If it is not low contrast, thenan ordinary final integration operation is performed (step S67), but ifit is low contrast, then a final integration based on light pre-emissionand ordinary light removal integration is performed (step S68) (cf. thefinal integration portions in FIGS. 21A, 21B, 21C, 21D, and 21E).

[0215] After that, the sensor data are read out (step S69), rangingcomputations are performed (step S70), and the focus lens 14 is drivenby the focus lens drive unit 13 based on the ranging results (step S71),whereupon the calling routine is returned to.

[0216] According to this second embodiment aspect, while virtually thesame effectiveness is demonstrated as with the first embodiment aspectdescribed earlier, provision is made so that, in cases where the objectis low contrast, and it is predicted that detection will not be possiblewith ordinary integration, light pre-emission and ordinary light removalintegration are performed to remove the ordinary light component so thathigh-contrast sensor data can be obtained.

[0217] Thus, by removing the ordinary light and capturing the imagewhile projecting auxiliary light, when making the preliminary detection,the influence of the background can be eliminated, the time lag causedby the ranging operation can be made shorter, and it is possible toperform high-precision ranging.

[0218]FIGS. 22A to 24 represent a third embodiment aspect of the presentinvention. FIGS. 22A and 22B are diagrams representing a divided areaduring wide-angle and telephoto operations; FIG. 23 is a diagram of aconfiguration for switching divided areas in units of optoelectrictransfer element arrays, being a portion of an AF area sensor; and FIG.24 is a diagram of a configuration for switching divided areas in unitsof pixels, being a portion of an AF area sensor.

[0219] In this third embodiment aspect, portions that are the same as inthe first and second embodiment aspects described earlier are notfurther described here; mainly the points of difference therebetween aredescribed.

[0220] The divided areas are first described, with reference to FIGS.22A and 22B.

[0221] With an external light ranging scheme, because there is adifference between the field of view of the ranging optical system andthe field of view of the photographic optical system, when the focallength of the photographic optical system changes, the usable range ofthe pixel region in the AF area sensor 12 also changes.

[0222] In such cases, when the divided area size is fixed, the dividedareas will become variously too rough or too fine when the focal lengthchanges, leading to such problems as the detection precision decliningor the processing time lag increasing.

[0223] That being so, this third embodiment aspect is made so that thedivided areas change according to the focal length of the photographicoptical system.

[0224] Specifically, as indicated in FIG. 22A, if the pixel regioncorresponding to the image pick-up screen when the focal length is setfor wide-angle shooting is designated by the symbol 50 and the dividedarea(s) by the symbol 51, then the region corresponding to the imagepick-up screen when the focal length is set for telephoto shooting willbecome as indicated by the symbol 52 in FIG. 22B.

[0225] At that time, when the divided area 51 is adopted that has thesame magnitude as when a wide-angle setting is in effect, the divisionswill be too coarse and the detection precision will decline, wherefore,as diagrammed in FIG. 22B, by making the size of the divided area 53smaller, the number of divided areas when the telephoto setting is ineffect can be made close to the number of divided areas when thewide-angle setting is in effect, so that balance is effected.

[0226] When, on the other hand, an attempt is made to apply themagnitude of the divided area as used when the telephoto setting is ineffect, as diagrammed in FIG. 22B, when the wide-angle setting is ineffect, the number of divisions will become too fine, the time requiredfor processing will increase, and the time lag will become great, but,because the divided area 51 with the magnitude as diagrammed in FIG. 22Ais used during wide-angle operations also, this can be prevented in thesame way.

[0227] A concrete configuration for changing divided areas is nowdescribed. To keep the description from becoming too complex, thedescription is given for the case of a basic, simple configuration.

[0228] First, the configuration of part of the AF area sensor 12 whichis for switching divided areas in units of optoelectric transfer elementarrays is described, with reference to FIG. 23.

[0229] Divided areas a and b are configured by a plurality ofoptoelectric transfer element arrays AR, with a monitor unit MB providedin each optoelectric transfer element array AR.

[0230] Provision is made so that the output from the monitor unit MBbelonging to the divided area a is connected to a divided area a peakdetection circuit 55, and a peak monitor output in the divided area a isgenerated in the divided area a monitor output.

[0231] Provision is made, similarly, so that the output from the monitorunit MB belonging to the divided area b is connected to a divided area bpeak detection circuit 56, and a peak monitor output in the divided areab is generated in the divided area b monitor output.

[0232] When the switches SW1a to SWna are turned on (the switches SW1bto SWnb turned off), it is possible to perform switching so that theoptoelectric transfer element arrays AR1 to ARn will belong to thedivided area a. Conversely, when the switches SW1b to SWnb are turned on(the switches SW1a to SWna turned off), switching is possible so thatthose optoelectric transfer element arrays AR1 to ARn belong to thedivided area b.

[0233] The configuration of part of the AF area sensor 12 that is forswitching the divided area pixel by pixel is now described, makingreference to FIG. 24.

[0234] The divided areas 1 and 2 are configured by a plurality of pixelgroups, and monitor circuits 1 to n are provided for each pixel 1 to n.

[0235] The outputs of the monitor circuits 1 to n belonging to thedivided area 1 are connected to the divided area 1 peak detectioncircuit 57, and a peak monitor output in the divided area 1 is generatedin the divided area 1 monitor output.

[0236] Similarly, the outputs of the monitor circuits 1 to n belongingto the divided area 2 are connected to the divided area 2 peak detectioncircuit 58, and a peak monitor output in the divided area 2 is generatedin the divided area 2 monitor output.

[0237] In such a configuration as this, when the switches SW1a to SWnaare turned on (the switches SW{overscore (1a)} to SW{overscore (na)}turned off), the pixel 1 to pixel n can be switched so as to belong tothe divided area 1. Conversely, when the switches SW{overscore (1a)} toSW{overscore (na)} are turned on (the switches SW1a to SWna turned off),they can be switched so as to belong to the divided area 2.

[0238] The switches SW1a to SWna and the switches SW{overscore (1a)} toSW{overscore (na)} noted above are configured so that they arecontrolled by the microcomputer 11 through a pixel monitor outputswitching circuit 59.

[0239] According to this third embodiment aspect, while exhibitingvirtually the same effectiveness as the first and second embodimentaspects described earlier, ideal divided areas are set according to thefocal length of the photographic optical system, wherefore highdetection precision can be maintained without increasing the time lag.

[0240] FIGS. 25 to 28 represent a fourth embodiment aspect of thepresent invention. FIG. 25 is a block diagram of the internalconfiguration of the AF area sensor 12; FIG. 26 is a flowchart of an AFroutine; FIGS. 27A, 27B, 27C, 27D, 27E, and 27F are timing chartsrepresenting the behavior of signals when preliminary integration andfinal integration are performed; and FIG. 28 is a diagram representingdivided areas corresponding to candidates for the primary object set fora photographic scene.

[0241] In this fourth embodiment aspect, portions that are the same asin the first to third embodiment aspects described earlier are notfurther described; the description focuses on the points of differencetherebetween.

[0242] First, the internal configuration of the AF area sensor isdescribed with reference to FIG. 25.

[0243] This AF area sensor is configured in order to shorten the timelag in the preliminary integration and final integration.

[0244] A variable amplifier 36 constituting amplification means is anamplifier which can vary the amplification factor under the control ofan amplification factor control unit 37 which is an amplification factorsetting means comprised in the control circuit 31. The amplificationfactor control unit 37 is configured so that it controls theamplification factor by instructions from the microcomputer 11. Thus thevariable amplifier 36 is configured so that it amplifies the sensor dataand outputs the results to the A/D converter 11 d in the microcomputer11.

[0245] Next, the AF routine is described with reference to FIG. 26.

[0246] In the main routine diagrammed in FIG. 26, when the AF routine iscalled in step S3, this AF operation is started.

[0247] First, the amplification factor of the variable amplifier 36 isset to a maximum amplification factor K (cf. FIG. 27D) (step S91).

[0248] Then a preliminary integration operation is performed (step S92).At this time, taking the amplification factor K into consideration, theintegration time is set to 1/K times the ordinary control integrationtime T and integration control is performed (cf. FIGS. 27A and 27B).

[0249] The sensor data amplified by a factor of K by the variableamplifier 36 are then A/D converted and read out (step S93) (cf. FIGS.27C, 27E, and 27F).

[0250] Thus, by amplifying, by a factor of K, the sensor data that havebeen integrated with the integration time modified by the 1/K factor,the preliminary integration time can be shortened without lowering thedetection precision.

[0251] Next, the primary object is detected (step S94), and a pluralityof divided areas is determined (step S95). For a photographic scene suchas that diagrammed in FIG. 28, for example, the plurality of dividedareas 1 to 3 corresponding to the primary object candidates is set.

[0252] Next, final integration is performed (step S96). In this finalintegration, integration control is effected in an integration time T1so that the brightest portion(s) in the plurality of divided areas does(do) not become saturated (cf. FIGS. 27A and 27B).

[0253] Also, for the divided areas noted above, appropriateamplification factors K1, K2, and K3 are set for each of the dividedareas 1, 2, and 3, and the sensor data are read out (step S97) (cf.FIGS. 27C, 27D, 27E, and 27F). In this manner the time lag for theintegration time can be suppressed to a minimum.

[0254] A ranging computation is then performed (step S98), and the focuslens 14 is driven by the focus lens drive unit 13 based on the resultsof that ranging (step S99), whereupon the calling routine is returnedto.

[0255] According to this fourth embodiment aspect, as described in theforegoing, virtually the same effectiveness as in the first to thirdembodiment aspects described earlier is exhibited. In addition, bysetting the sensor data amplification factor to maximum during thepreliminary detection operation, and reducing the integration time by afactor that is the reciprocal of the amplification factor, thepreliminary integration time can be reduced.

[0256] Furthermore, because the amplification factor is varied for eachdivided area, and respective amplification factors can be set, it ispossible to set amplification factors appropriate to each divided areaand perform read-out, and obtain appropriate sensor data can beobtained, even when effecting integration control with the sameintegration time on all areas, for example.

[0257] In this invention, it is apparent that working modes different ina wide range can be formed on the basis of this invention withoutdeparting from the spirit and scope of the invention. This invention isnot restricted by any specific embodiment except insofar as it islimited by the appended claims.

What is claimed is:
 1. A distance measuring device comprising: twooptical systems exhibiting parallax; an image pick-up element forphotographically capturing two images formed by said optical systems;region setting means for setting divided regions based on output fromsaid image pick-up element; integration control means for controllingintegration operations of said image pick-up element according todivided regions produced by said region division means; and distancemeasurement means for performing distance measurements based on outputfrom said image pick-up element.
 2. The distance measuring deviceaccording to claim 1 , wherein said integration control means performintegration control on said divided regions based on integrationquantity monitor signals in divided regions set by said region divisionmeans.
 3. The distance measuring device according to claim 1 , furthercomprising preliminary detection means for preliminarily performingintegration operations to analyze output of said image pick-up element,wherein said region setting means set divided regions based on outputfrom said preliminary detection means.
 4. The distance measuring deviceaccording to claim 3 , further comprising: amplification means foramplifying output of said image pick-up element; and amplificationfactor setting means for varying amplification factor of saidamplification means according to said divided region; wherein saidamplification factor setting means set amplification factor of saidamplification means to a maximum value when preliminary detection isbeing performed by said preliminary detection means.
 5. The distancemeasuring device according to claim 1 , further comprising focal lengthdetection means for detecting focal length of photographic opticalsystem, wherein said region setting means set divided regions based onoutput from said focal length detection means.
 6. The distance measuringdevice according to claim 3 , further comprising: auxiliary lightprojection means for projecting auxiliary light on object; and ordinarylight elimination means for eliminating ordinary light components otherthan auxiliary light from output of said image pick-up element; whereinsaid preliminary detection means activate said auxiliary lightprojection means and said ordinary light elimination means and performsaid preliminary integration operation.
 7. A distance measuring devicecomprising: area sensor means deployed at positions of focal points of apair of image forming optical systems, having a pair of light receivingregions, and capable of performing preliminary integration operationswhile causing light emitting means to emit light; region division meansfor dividing each of said light receiving regions of said area sensormeans into a plurality of sub-regions according to object fieldluminance distribution obtained by results of preliminary integrationsof said area sensor means; and control means for causing said areasensor means to perform final integration operations for each of saidset plurality of light receiving regions and for performing distancemeasurement computations based on data obtained for each of thoseplurality of light receiving regions.
 8. The distance measuring deviceaccording to claim 7 , wherein said region division means divide each ofsaid light receiving regions of said area sensor means into a pluralityof regions according to object field luminance distribution obtained byresults of preliminary integrations of said area sensor means and tofocal length value of photographic lens.
 9. A camera having an autofocusdevice and comprising: an area sensor means deployed in the vicinity ofposition of focal points of a pair of image forming optical systems, andhaving a pair of light receiving regions; a region dividing unit fordividing each of light receiving regions of said area sensor means intoa plurality of regions according to area sensor data obtained fromresults of preliminary integrations of said area sensor means; and acontrol circuit for causing said area sensor to perform finalintegration operations for each of said set plurality of light receivingregions, and for computing signals for putting a photographic lens intoa focused condition based on data obtained for each of said plurality oflight receiving regions.
 10. The camera according to claim 9 , whereinsaid control circuit sets monitor regions for monitoring integrationcontrol of said area sensor in correspondence with each of said setplurality of light receiving regions.
 11. The camera according to claim9 , comprising: an amplification circuit for amplifying output signalsof said area sensor; and an amplification factor control circuit forcontrolling amplification factor of said amplification circuit; whereinsaid amplification factor control circuit sets amplification factor ofsaid amplification circuit to a maximum value when performing saidpreliminary integration operation, and to an appropriate amplificationfactor found for each of said set regions when performing said finalintegration operation.
 12. A distance measuring device comprising: anarea sensor deployed in the vicinity of focal points of a pair of imageforming optical systems, and having a pair of light receiving regions;main photographic object detection means for detecting region where mainphotographic object is present; region division means for setting lightreceiving regions of said area sensor based on output of said mainphotographic object detection means; and control means for causing saidarea sensor means to perform final integration operations for each ofsaid set light receiving regions, and performing distance measurementcomputations based on data obtained for each of those light receivingregions.
 13. The distance measuring device according to claim 12 ,further comprising: light projection means for projecting light ontophotographic object; and ordinary light elimination means foreliminating ordinary light component from output of said area sensor;wherein said main photographic object detection means activate saidlight projection means and said ordinary light elimination means anddetect region where said main photographic object is present.
 14. Acontrol method for a camera that puts a photographic lens into a focusedcondition for a main photographic object in an image pick-up screen,comprising the steps of: detecting image signals in said image pick-upscreen; detecting said main photographic object based on said imagesignals; setting a virtual area inside said image pick-up screen so asto contain said detected main photographic object; again detecting imagesignals in said virtual area; computing signals for putting saidphotographic lens into a focused condition based on said re-detectedimage signals; and putting said photographic lens in a focused conditionbased on results of said computation.
 15. The control method accordingto claim 14 , wherein said step for detecting said main photographicobject comprises steps of: smoothing processing for removing randomnoise from said image signals; differential processing for performingedge detection based on signals which have been subjected to saidprocessing; binarizing processing for finding binary image(s) based onsignals which have been subjected to said processing; labeling figuremerging processing for separating connected regions having similarluminance values based on signals which have been subjected to saidprocessing; line narrowing processing for objecting said connectedregions to a line narrowing process; and shape determination processingfor extracting main photographic object based on signals which have beensubjected to said processing.
 16. The method according to claim 15 ,wherein said shape determination processing step extracts portionwherein a roughly circular portion was detected, as main photographicobject.
 17. The method according to claim 14 , wherein said step fordetecting image signals in said image pick-up screen detects amount oflight reflected when light was projected in said image pick-up screen.